package api_day01;

import java.util.Date;

public class DateDemo {
    public static void main(String[] args) {
        Date date = new Date();
        long time = date.getTime();
        Date date_before = new Date(time - 10l);
        Date date_after = new Date(time + 10l);
        if (date.after(date_before)){
            System.out.println(1);
        }
        if (date.before(date_after)){
            System.out.println(0);
        }
        System.out.println("---------------------------------");
        Date date1 = new Date();
        long time1 = date1.getTime() + 3600l*1000;
        date1.setTime(time1);
        System.out.println(date1);
    }
}